/**
 * 象棋棋盘格子样式
 */

.chess-cell {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.chess-cell:hover {
  background-color: rgba(255, 215, 0, 0.2);
}

/* 棋盘线条 - 线条已在棋盘背景绘制，这里不需要了 */
.cell-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 棋子样式 - 居中在格子中心（交叉点）*/
.chess-piece {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  border: 2px solid;
  background: radial-gradient(circle, #fff 0%, #f0f0f0 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  z-index: 2;
}

.piece-red {
  color: #DC143C;
  border-color: #DC143C;
}

.piece-black {
  color: #2F4F4F;
  border-color: #2F4F4F;
}

.piece-selected {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.8);
}

/* 移动提示 */
.move-hint {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #90EE90;
  opacity: 0.8;
  z-index: 1;
  animation: pulse 1.5s infinite;
}

.capture-hint {
  width: 54px;
  height: 54px;
  border: 3px solid #FF6B6B;
  background-color: transparent;
  border-radius: 50%;
}

/* 选中高亮 */
.selection-highlight {
  position: absolute;
  inset: 2px;
  border: 3px solid #FFD700;
  border-radius: 8px;
  background-color: rgba(255, 215, 0, 0.2);
  z-index: 1;
}

/* 上次移动高亮 */
.last-move-highlight {
  position: absolute;
  inset: 2px;
  border: 2px solid #DDA0DD;
  border-radius: 6px;
  background-color: rgba(221, 160, 221, 0.1);
  z-index: 1;
}

/* 将军警告 */
.check-warning {
  position: absolute;
  inset: 0;
  border: 3px solid #FF6B6B;
  border-radius: 8px;
  background-color: rgba(255, 107, 107, 0.2);
  animation: warning-flash 1s infinite;
  z-index: 1;
}

/* 动画效果 */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

@keyframes warning-flash {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.5;
  }
}

/* 状态样式 */
.cell-valid-move {
  background-color: rgba(144, 238, 144, 0.1);
}

.cell-selected {
  background-color: rgba(255, 215, 0, 0.3);
}

.cell-last-move {
  background-color: rgba(221, 160, 221, 0.2);
}

.cell-in-check {
  background-color: rgba(255, 107, 107, 0.3);
}
